import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '../static/css/reset.css'
import '../static/css/main.css'
import '../static/css/fontIcon/iconfont.css'
import  store from '@/store'
Vue.use(ElementUI)
Vue.config.productionTip = false;
Vue.filter('timeFilter',  (value)=> {
  // 返回处理后的值
  if (value === undefined) return;
  let time;
  if(value > -1){
    let hour = Math.floor(value/3600);
    let min = Math.floor(value/60) % 60;
    let sec = value % 60;
    let day = parseInt(hour / 24);
    if (day > 0) {
      hour = hour - 24 * day;
      time = day + "day " + hour + ":";
    }
    else time = hour + ":";
    if(min < 10){value += "0";}
    time += min + ":";
    if(sec < 10){time += "0";}
    time += sec;
  }
  return time;
})
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
